﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;

namespace PartyCraftServer.Web.Pages
{
    public class Logout : WebHandler
    {
        public override void HandleRequest(HttpListenerContext Context)
        {
            if (PartyCraft.WebService.LoggedInUsers.ContainsKey(Context.Request.RemoteEndPoint.Address.ToString()))
                PartyCraft.WebService.LoggedInUsers.Remove(Context.Request.RemoteEndPoint.Address.ToString());
            Redirect(Context, "/");
        }
    }
}
